package com.mall.admin.service;

import com.mall.commons.utils.PageResult;
import com.mall.domain.OmsOrderReturnReason;
import com.mall.interface1.api.OmsOrderReturnReasonApi;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OmsOrderReturnReasonService {

    @DubboReference
    private OmsOrderReturnReasonApi omsOrderReturnReasonApi;

    //分页查询退货原因
    public PageResult list(Integer pageNum, Integer pageSize) {
        List<OmsOrderReturnReason> oorrList = omsOrderReturnReasonApi.list(pageNum,pageSize);
        Integer count = omsOrderReturnReasonApi.count();
        return new PageResult(pageNum,pageSize,count,oorrList);
    }

    //获取单个退货原因详情信息
    public OmsOrderReturnReason findReason(Long id) {
        return omsOrderReturnReasonApi.findById(id);
    }
}
